<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>第21题</title>
    <script>
        // 用户输入
        var a = parseInt(prompt("请输入一个数字"));
        // 累乘
        var b = 1;
        for (var i = a; i>= 1; i--) {
            b *= i
        }
        alert(b);
    </script>
</head>
<body>
    
</body>
</html>